/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToOne;

/**
 *
 * @author Gatoper
 */
@Entity
public class Pet implements Serializable {

    public Pet(String name) {
        this.name = name;
    }

    public Pet(String name, String species, String age, String weight, byte[] picture, Owner owner) {
        this.name = name;
        this.species = species;
        this.age = age;
        this.weight = weight;
        this.picture = picture;
        this.owner = owner;
    }
    
    @Id
    @Column(name = "name")
    private String name;
    @Column(name = "species")
    private String species;
    @Column(name = "age")
    private String age;
    @Column(name = "weight")
    private String weight;
    @Column(name = "picture")
    private byte[] picture;
    private Owner owner;
    @OneToOne(mappedBy="Pet")
    private Medicalrecord medicalrecord;
//
//    public Medicalrecord getMedicalrecord() {
//        return medicalrecord;
//    }
//
//    public void setMedicalrecord(Medicalrecord medicalrecord) {
//        this.medicalrecord = medicalrecord;
//    }

    public Owner getOwner() {
        return owner;
    }

    public void setOwner(Owner owner) {
        this.owner = owner;
    }

    public Pet() {
        super();
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpecies() {
        return species;
    }

    public void setSpecies(String species) {
        this.species = species;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public byte[] getPicture() {
        return picture;
    }

    public void setPicture(byte[] picture) {
        this.picture = picture;
    }

   
}
